1. Field of the Invention
The present invention relates to a memory management device including a nonvolatile memory and a memory device.
2. Description of the Related Art
In a conventional NAND flash memory, which is a type of nonvolatile memory, when part of the data in a physical block is overwritten, it is necessary to write the remaining data in the block to another block. This processing takes a long time.
To obviate such extra write processing, Jpn. Pat. Appln. KOKAI Publication No. 2003-280822, for example, discloses a method in which a number of physical blocks are related to one virtual block. In this method, the relation between the physical blocks and the virtual block is canceled in response to an erase command, shortening the time required for erasing data.
If a memory card (memory device) incorporating a conventional a NAND flash memory adopts a file allocation table (FAT) file system, which is recommended for an SD (trademark) memory card, and has a capacity of 1 GB or less, the size of each cluster in the memory card is 16 Kbytes. Because of this, the size of a file to be written to or read from the memory card is a multiple of 16 Kbytes. Thus, in many cases, a host device designates 16 Kbytes as the amount of data to be erased at one time, when issuing an erase command. It should be noted that, in most cases, erase commands are issued to the memory card when formatting the card. This involves the host device reading the master boot record, and progressively erasing data in units of 16 Kbytes by sequentially addressing the blocks to be erased.
Conventionally, the physical block size of many NAND flash memories is 16 Kbytes, which is equal to the above-mentioned cluster size. However, in recent years, NAND flash memories having, for instance, 32-, 128- and 256-Kbyte physical blocks, have appeared.
Where a NAND flash memory has 256-Kbyte physical blocks and 16-Kbyte clusters, in erasing 16 Kbytes of data from a physical block in the NAND flash memory, the other 240 Kbytes of data must be copied to another physical block. This is because the NAND flash memory cannot be overwritten. Accordingly, when data in a NAND flash memory is partially erased, it takes a long time.